<template>
  <div class="trust-cellSelect">
    <span class="trust-cellSelect-title">
      {{ label }}
    </span>
    <SelectData
      v-model="currentValue"
      :list="source"
      v-bind="$attrs"
    />
  </div>
</template>

<script>
  import SelectData from "../SelectData/index.vue"

  export default {
    name: 'CellSelect',
    components: { SelectData },
    props: {
      label: {},
      value: {},
      source: {}
    },
    computed: {
      currentValue: {
        get() {
          return this.value
        },
        set(val) {
          this.$emit('input', val)
        }
      }
    }
  }
</script>

<style
  lang="stylus"
  rel="stylesheet/stylus"
  type="text/stylus">
  .trust-cellSelect
    display: flex
    align-items: center
    justify-content: space-between
    background: #FFFFFF
    padding: 10px 15px

    &-title
      font-family: PingFangSC-Medium
      font-size: 16px
      line-height: 40px
      color: #4A4A4A
      letter-spacing: -0.39px
</style>
